package org.payeco.risk.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * @author yps
 * 风控规则模型
 */
@Entity
@Table(name = "PAYECO_RISKRULE")
@NamedQuery(name = "PayecoRiskRule.findByRiskNo", query = "select p from PayecoRiskRule p where p.riskno=?1")
public class PayecoRiskRule implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "RULEID", unique = true, nullable = false)
	private Long ruleid;
	@Column(name = "CLASSNAME", nullable = false, length = 50)
	private String classname;
	@Column(name = "CHECKMODE", nullable = false, length = 20)
	private String checkmode;
	@Column(name = "STATE", nullable = false, length = 20)
	private String state;
	@Column(name = "PRIORITY", nullable = false)
	private Integer priority;
	@Column(name = "PATTERN", nullable = false, length = 256)
	private String pattern;
	@Column(name = "RISKVALUE", length = 250)
	private String riskvalue;
	@Column(name = "RISKACTION", nullable = false, length = 50)
	private String riskaction;
	@Column(name = "ERRORCODE", length = 20)
	private String errorcode;
	@Column(name = "BANK", length = 512)
	private String bank;
	@Column(name = "INDUSTRY", length = 1024)
	private String industry;
	@Column(name = "SYSMERCHANTNO", length = 50)
	private String sysmerchantno;
	@Column(name = "PRODUCTNO", length = 1024)
	private String productno;
	@Column(name = "USERLEVEL", length = 1024)
	private String userlevel;
	@Column(name = "ACCOUNTTYPE", length = 100)
	private String accounttype;
	@Column(name = "TITLE", length = 512)
	private String title;
	@Column(name = "GUIDE", length = 512)
	private String guide;
	@Column(name = "CREATEDBY", length = 50)
	private String createdby;
	@Column(name = "CREATEDDT", length = 26)
	private Date createddt;
	@Column(name = "MODIFIEDBY", length = 50)
	private String modifiedby;
	@Column(name = "MODIFIEDDT", length = 26)
	private Date modifieddt;
	@Column(name = "RISKNO", unique = true, nullable = false, length = 50)
	private String riskno;
	@Column(name = "FORREGISTEREDMOBILE", nullable = false, length = 50)
	private String forregisteredmobile = "UNDEFINED";
	@Column(name = "FORRELATIVEMOBILE", nullable = false, length = 50)
	private String forrelativemobile = "UNDEFINED"; // �Ƿ�����ֻ���
	@Column(name = "FORSELFTRANS", nullable = false, length = 50)
	private String forselftrans = "UNDEFINED"; // �Ƿ�������
	@Column(name = "FORINTERNATIONAL", nullable = false, length = 50)
	private String forinternational = "UNDEFINED"; // �Ƿ���ʻ�Ʊ
	@Column(name = "GROUPNAME", length = 50)
	private String groupname;
	@Column(name = "GROUPPRIORITY", nullable = false)
	private Integer grouppriority = 0;
	@Column(name = "FORORDERSTATE2", nullable = false, length = 50)
	private String fororderstate2 = "UNDEFINED"; // �Ƿ�֧���ɹ�
	@Column(name = "VALIDDAYS", nullable = false)
	private Integer validdays = -1; // ��ص���Ч�����������п�¼��ʱ������
	@Column(name = "VALIDDAYS2", nullable = false)
	private Integer validdays2 = -1; //
	@Column(name = "FORRISKASSURERBYDNA", nullable = false, length = 50)
	private String forriskassurerbydna = "UNDEFINED";
	@Column(name = "MANUALLYVERIFYTYPE", length = 50)
	private String manuallyverifytype = "";
	@Column(name = "FORMERCHANTBINDONLY", nullable = false, length = 50)
	private String formerchantbindonly = "UNDEFINED";
	@Column(name = "FORDIFFERENTREGION", nullable = false, length = 50)
	private String fordifferentregion = "UNDEFINED"; //
	@Column(name = "FORDIFFMUNICIPALITY", length = 50)
	private String fordiffmunicipality = "UNDEFINED"; //
	@Column(name = "FORDIFFERENTCITY", length = 50)
	private String fordifferentcity = "UNDEFINED"; //
	@Column(name = "FORMERCHANTOLDUSER", length = 50)
	private String formerchantolduser = "UNDEFINED"; //
	@Column(name = "FORSIGNEDBYUSER", length = 50)
	private String forsignedbyuser = "UNDEFINED"; //
	@Column(name = "FORCHANNELNOPWD", length = 50)
	private String forchannelnopwd = "UNDEFINED"; //
	@Column(name = "FORMOBILEPLUGIN", length = 50)
	private String formobileplugin = "UNDEFINED"; //
	@Column(name = "EXCLUDEDMERCHANTS", length = 512)
	private String excludedmerchants = ""; // ��ػ����ϵͳ�̻���
	@Column(name = "CUSTOMRISKGROUP", length = 50)
	private String customriskgroup = "UNDEFINED"; //
	@Column(name = "MOBILEOPERATOR", length = 50)
	private String mobileoperator = "UNDEFINED"; //
	@Column(name = "FORFOREIGNORDER", length = 50)
	private String forforeignorder = "UNDEFINED";
	@Column(name = "FORINITIALORDER", length = 50)
	private String forinitialorder = "UNDEFINED"; //
	@Column(name = "FORPAYIMMEDIATELY", length = 50)
	private String forpayimmediately = "UNDEFINED"; //
	// RISK-112 2014.10.21 yanho ��ؼܹ�ǿ��
	@Column(name = "RULEDEMANDS", length = 256)
	private String ruledemands = "";
	@Column(name = "RULEVERSION", nullable = false)
	private Integer ruleversion = 0;
	@Column(name = "AMTLOWERBOUND", nullable = false, precision = 14)
	private Double amtlowerbound = -1d;
	@Column(name = "AMTUPPERBOUND", nullable = false, precision = 14)
	private Double amtupperbound = -1d;
	@Column(name = "AMTPERIODUNIT", length = 50)
	private String amtperiodunit = "UNDEFINED";
	@Column(name = "AMTCOUNTRANGE", length = 50)
	private String amtcountrange = "UNDEFINED";
	@Column(name = "AMTDECIDEMODE", length = 50)
	private String amtdecidemode = "UNDEFINED";
	@Column(name = "AREAJUDGEOBJ", length = 50)
	private String areajudgeobj = "UNDEFINED";
	@Column(name = "AREAACCURACY", length = 50)
	private String areaaccuracy = "UNDEFINED";
	@Column(name = "ISSAMEREGION", length = 50)
	private String issameregion = "UNDEFINED";

	// DN-1426 20150304 yepeisheng �ƶ�boss���
	@Column(name = "FORISCHINAMOBILEBOSS", length = 50)
	private String forischinamobileboss = "UNDEFINED";// �Ƿ��ƶ�boss;
	// RISK-343 20150415 YEPEISHENG ���Ӷ���ʱ�� ��ָ��ʱ�����͵��ֶ�
	@Column(name = "PASTDAYS", nullable = false)
	private Integer pastdays = -1;
	@Column(name = "PASTDAYSTYPE", length = 50)
	private String pastdaystype = "UNDEFINED";
	// RISK-440
	// ����ж�����һ��ʹ�� ������ʽ��
	@Column(name = "FORTRUSTEDMOBILE", length = 50)
	private String fortrustedmobile = "UNDEFINED";
	// RISK-593//���ӷ��2.0���ж��ֶ�
	@Column(name = "FORSECONDVALIDED", length = 50)
	private String forSecondValided = "UNDEFINED";// forSecondaryRisk
	// RISK-599 ���ӿ츶�û����ж��ֶ�
	@Column(name = "FOREXPRESSPAYMENT", length = 50)
	private String forExpressPayment = "UNDEFINED";
	@Column(name = "chargeType", nullable = false, length = 50)
	private String chargeType = "UNDEFINED";
	@Column(name = "forSameProvice", nullable = false, length = 50)
	private String forSameProvice = "UNDEFINED";
	@Column(name = "orderFrom", length = 100)
	private String orderFrom = "UNDEFINED"; // ���ͨһ�̻������ֲ�ͬ�µ���ʽ��һ��ͨ���غ������
	@Column(name = "forMerchantVip", length = 50)
	private String forMerchantVip = "UNDEFINED";
	// dn-2100 �������û�
	@Column(name = "forDtpServerUser", length = 50)
	private String forDtpServerUser = "UNDEFINED";
	@Column(name = "forActionType", length = 50)
	private String forActionType = "UNDEFINED";
	@Column(name = "amtVolDecideType", length = 50)
	private String amtVolDecideType = "AMT";
	@Column(name = "FORFIRSTAPIVALIDED", length = 50)
	private String forFirstApiValided = "UNDEFINED";// 1.0�ӿ���֤���
	@Column(name = "FORTHIRDDLYVALIDED", length = 50)
	private String forThirdlyApiValided;
	@Column(name = "FORTWOPFIVEVALIDED", length = 50)
	private String forTwoPFiveApiValided;

	
	/** default constructor */
	public PayecoRiskRule() {
		// TODO Auto-generated constructor stub
	}

	public Object clone() throws CloneNotSupportedException {
		PayecoRiskRule rule = null;
		rule = (PayecoRiskRule) super.clone();
		return rule;
	}

	/** minimal constructor */
	public PayecoRiskRule(Long ruleid, String classname, String checkmode,
			String state, Integer priority, String pattern, String riskaction,
			String riskno) {
		this.ruleid = ruleid;
		this.classname = classname;
		this.checkmode = checkmode;
		this.state = state;
		this.priority = priority;
		this.pattern = pattern;
		this.riskaction = riskaction;
		this.riskno = riskno;
	}

	// Property accessors

	public Long getRuleid() {
		return this.ruleid;
	}

	public void setRuleid(Long ruleid) {
		this.ruleid = ruleid;
	}

	public String getClassname() {
		return this.classname;
	}

	public String getChargeType() {
		return chargeType;
	}

	public void setChargeType(String chargeType) {
		this.chargeType = chargeType;
	}

	public String getForSameProvice() {
		return forSameProvice;
	}

	public void setForSameProvice(String forSameProvice) {
		this.forSameProvice = forSameProvice;
	}

	public void setClassname(String classname) {
		this.classname = classname;
	}

	public String getCheckmode() {
		return this.checkmode;
	}

	public void setCheckmode(String checkmode) {
		this.checkmode = checkmode;
	}

	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Integer getPriority() {
		return this.priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public String getPattern() {
		return this.pattern;
	}

	public void setPattern(String pattern) {
		this.pattern = pattern;
	}

	public String getRiskvlaue() {
		return this.riskvalue;
	}

	public void setRiskvalue(String riskvalue) {
		this.riskvalue = riskvalue;
	}

	public String getErrorcode() {
		return this.errorcode;
	}

	public void setErrorcode(String errorcode) {
		this.errorcode = errorcode;
	}

	public String getBank() {
		return this.bank;
	}

	public void setBank(String bank) {
		this.bank = bank;
	}

	public String getIndustry() {
		return this.industry;
	}

	public void setIndustry(String industry) {
		this.industry = industry;
	}

	public String getSysmerchantno() {
		return this.sysmerchantno;
	}

	public void setSysmerchantno(String sysmerchantno) {
		this.sysmerchantno = sysmerchantno;
	}

	public String getProductno() {
		return this.productno;
	}

	public void setProductno(String productno) {
		this.productno = productno;
	}

	public String getUserlevel() {
		return this.userlevel;
	}

	public void setUserlevel(String userlevel) {
		this.userlevel = userlevel;
	}

	public String getAccounttype() {
		return this.accounttype;
	}

	public void setAccounttype(String accounttype) {
		this.accounttype = accounttype;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getGuide() {
		return this.guide;
	}

	public void setGuide(String guide) {
		this.guide = guide;
	}

	public String getCreatedby() {
		return this.createdby;
	}

	public void setCreatedby(String createdby) {
		this.createdby = createdby;
	}

	public Date getCreateddt() {
		return this.createddt;
	}

	public void setCreateddt(Date createddt) {
		this.createddt = createddt;
	}

	public String getModifiedby() {
		return this.modifiedby;
	}

	public void setModifiedby(String modifiedby) {
		this.modifiedby = modifiedby;
	}

	public Date getModifieddt() {
		return this.modifieddt;
	}

	public void setModifieddt(Date modifieddt) {
		this.modifieddt = modifieddt;
	}

	public String getRiskno() {
		return this.riskno;
	}

	public void setRiskno(String riskno) {
		this.riskno = riskno;
	}

	public String getForregisteredmobile() {
		return this.forregisteredmobile;
	}

	public void setForregisteredmobile(String forregisteredmobile) {
		this.forregisteredmobile = forregisteredmobile;
	}

	public String getForrelativemobile() {
		return this.forrelativemobile;
	}

	public void setForrelativemobile(String forrelativemobile) {
		this.forrelativemobile = forrelativemobile;
	}

	public String getForselftrans() {
		return this.forselftrans;
	}

	public void setForselftrans(String forselftrans) {
		this.forselftrans = forselftrans;
	}

	public String getForinternational() {
		return this.forinternational;
	}

	public void setForinternational(String forinternational) {
		this.forinternational = forinternational;
	}

	public String getGroupname() {
		return this.groupname;
	}

	public void setGroupname(String groupname) {
		this.groupname = groupname;
	}

	public Integer getGrouppriority() {
		return this.grouppriority;
	}

	public void setGrouppriority(Integer grouppriority) {
		this.grouppriority = grouppriority;
	}

	public String getFororderstate2() {
		return this.fororderstate2;
	}

	public void setFororderstate2(String fororderstate2) {
		this.fororderstate2 = fororderstate2;
	}

	public Integer getValiddays() {
		return this.validdays;
	}

	public void setValiddays(Integer validdays) {
		this.validdays = validdays;
	}

	public String getFordifferentregion() {
		return this.fordifferentregion;
	}

	public void setFordifferentregion(String fordifferentregion) {
		this.fordifferentregion = fordifferentregion;
	}

	public String getForriskassurerbydna() {
		return this.forriskassurerbydna;
	}

	public void setForriskassurerbydna(String forriskassurerbydna) {
		this.forriskassurerbydna = forriskassurerbydna;
	}

	public String getManuallyverifytype() {
		return this.manuallyverifytype;
	}

	public void setManuallyverifytype(String manuallyverifytype) {
		this.manuallyverifytype = manuallyverifytype;
	}

	public String getFormerchantbindonly() {
		return this.formerchantbindonly;
	}

	public void setFormerchantbindonly(String formerchantbindonly) {
		this.formerchantbindonly = formerchantbindonly;
	}

	public String getFordiffmunicipality() {
		return this.fordiffmunicipality;
	}

	public void setFordiffmunicipality(String fordiffmunicipality) {
		this.fordiffmunicipality = fordiffmunicipality;
	}

	public String getFordifferentcity() {
		return fordifferentcity;
	}

	public void setFordifferentcity(String fordifferentcity) {
		this.fordifferentcity = fordifferentcity;
	}

	public String getFormerchantolduser() {
		return this.formerchantolduser;
	}

	public void setFormerchantolduser(String formerchantolduser) {
		this.formerchantolduser = formerchantolduser;
	}

	public String getForsignedbyuser() {
		return this.forsignedbyuser;
	}

	public void setForsignedbyuser(String forsignedbyuser) {
		this.forsignedbyuser = forsignedbyuser;
	}

	public String getForchannelnopwd() {
		return this.forchannelnopwd;
	}

	public void setForchannelnopwd(String forchannelnopwd) {
		this.forchannelnopwd = forchannelnopwd;
	}

	public String getFormobileplugin() {
		return this.formobileplugin;
	}

	public void setFormobileplugin(String formobileplugin) {
		this.formobileplugin = formobileplugin;
	}

	public String getExcludedmerchants() {
		return this.excludedmerchants;
	}

	public void setExcludedmerchants(String excludedmerchants) {
		this.excludedmerchants = excludedmerchants;
	}

	public String getCustomriskgroup() {
		return this.customriskgroup;
	}

	public void setCustomriskgroup(String customriskgroup) {
		this.customriskgroup = customriskgroup;
	}

	public Integer getValiddays2() {
		return this.validdays2;
	}

	public void setValiddays2(Integer validdays2) {
		this.validdays2 = validdays2;
	}

	public String getMobileoperator() {
		return this.mobileoperator;
	}

	public void setMobileoperator(String mobileoperator) {
		this.mobileoperator = mobileoperator;
	}

	public String getForforeignorder() {
		return this.forforeignorder;
	}

	public void setForforeignorder(String forforeignorder) {
		this.forforeignorder = forforeignorder;
	}

	public String getForinitialorder() {
		return forinitialorder;
	}

	public void setForinitialorder(String forinitialorder) {
		this.forinitialorder = forinitialorder;
	}

	public String getForpayimmediately() {
		return forpayimmediately;
	}

	public void setForpayimmediately(String forpayimmediately) {
		this.forpayimmediately = forpayimmediately;
	}

	public Double getAmtlowerbound() {
		return amtlowerbound;
	}

	public void setAmtlowerbound(Double amtlowerbound) {
		this.amtlowerbound = amtlowerbound;
	}

	public Double getAmtupperbound() {
		return amtupperbound;
	}

	public void setAmtupperbound(Double amtupperbound) {
		this.amtupperbound = amtupperbound;
	}

	public String getAmtperiodunit() {
		return amtperiodunit;
	}

	public void setAmtperiodunit(String amtperiodunit) {
		this.amtperiodunit = amtperiodunit;
	}

	public String getAmtcountrange() {
		return amtcountrange;
	}

	public void setAmtcountrange(String amtcountrange) {
		this.amtcountrange = amtcountrange;
	}

	public String getAmtdecidemode() {
		return amtdecidemode;
	}

	public void setAmtdecidemode(String amtdecidemode) {
		this.amtdecidemode = amtdecidemode;
	}

	public String getRuledemands() {
		return ruledemands;
	}

	public void setRuledemands(String ruledemands) {
		this.ruledemands = ruledemands;
	}

	public Integer getRuleversion() {
		return ruleversion;
	}

	public void setRuleversion(Integer ruleversion) {
		this.ruleversion = ruleversion;
	}

	public String getAreajudgeobj() {
		return areajudgeobj;
	}

	public void setAreajudgeobj(String areajudgeobj) {
		this.areajudgeobj = areajudgeobj;
	}

	public String getAreaaccuracy() {
		return areaaccuracy;
	}

	public void setAreaaccuracy(String areaaccuracy) {
		this.areaaccuracy = areaaccuracy;
	}

	public String getIssameregion() {
		return issameregion;
	}

	public void setIssameregion(String issameregion) {
		this.issameregion = issameregion;
	}

	public String getForischinamobileboss() {
		return forischinamobileboss;
	}

	public void setForischinamobileboss(String forischinamobileboss) {
		this.forischinamobileboss = forischinamobileboss;
	}

	// RISK-343
	public Integer getPastdays() {
		return pastdays;
	}

	public void setPastdays(Integer pastdays) {
		this.pastdays = pastdays;
	}

	public String getPastdaystype() {
		return pastdaystype;
	}

	public void setPastdaystype(String pastdaystype) {
		this.pastdaystype = pastdaystype;
	}

	public String getFortrustedmobile() {
		return fortrustedmobile;
	}

	public void setFortrustedmobile(String fortrustedmobile) {
		this.fortrustedmobile = fortrustedmobile;
	}

	/*
	 * public String getBelongto() { return belongto; }
	 * 
	 * public void setBelongto(String belongto) { this.belongto = belongto; }
	 */
	public String getForFirstApiValided() {
		return forFirstApiValided;
	}

	public void setForFirstApiValided(String forFirstApiValided) {
		this.forFirstApiValided = forFirstApiValided;
	}

	public String getForSecondValided() {
		return forSecondValided;
	}

	public void setForSecondValided(String forSecondValided) {
		this.forSecondValided = forSecondValided;
	}

	public String getForExpressPayment() {
		return forExpressPayment;
	}

	public void setForExpressPayment(String forExpressPayment) {
		this.forExpressPayment = forExpressPayment;
	}

	public String getOrderFrom() {
		return orderFrom;
	}

	public void setOrderFrom(String orderFrom) {
		this.orderFrom = orderFrom;
	}

	public String getForActionType() {
		return forActionType;
	}

	public void setForActionType(String forActionType) {
		this.forActionType = forActionType;
	}

	public String getForMerchantVip() {
		return forMerchantVip;
	}

	public void setForMerchantVip(String forMerchantVip) {
		this.forMerchantVip = forMerchantVip;
	}

	public String getForDtpServerUser() {
		return forDtpServerUser;
	}

	public void setForDtpServerUser(String forDtpServerUser) {
		this.forDtpServerUser = forDtpServerUser;
	}

	public String getAmtVolDecideType() {
		return amtVolDecideType;
	}

	public void setAmtVolDecideType(String amtVolDecideType) {
		this.amtVolDecideType = amtVolDecideType;
	}

	public String getForThirdlyApiValided() {
		return forThirdlyApiValided;
	}

	public void setForThirdlyApiValided(String forThirdlyApiValided) {
		this.forThirdlyApiValided = forThirdlyApiValided;
	}

	public String getForTwoPFiveApiValided() {
		return forTwoPFiveApiValided;
	}

	public void setForTwoPFiveApiValided(String forTwoPFiveApiValided) {
		this.forTwoPFiveApiValided = forTwoPFiveApiValided;
	}

	public String getRiskaction() {
		return riskaction;
	}

	public void setRiskaction(String riskaction) {
		this.riskaction = riskaction;
	}

	public String getRiskvalue() {
		return riskvalue;
	}

}
